//
//  AppointmentTableViewCell.swift
//  DSHCMerchant
//
//  Created by 罗德良 on 2018/4/13.
//  Copyright © 2018年 袋鼠好车. All rights reserved.
//

import UIKit

class AppointmentTableViewCell: UITableViewCell {
    
    //1 拒绝  2 接收  3 完成   对预约订单操作
    typealias ThreeBtnBlock = (_ value:Int) -> Void
    
    @IBOutlet var appointmentNumLabel: UILabel!
    
    @IBOutlet var userImageView: UIImageView!
    
    @IBOutlet var serviceTypeLabel: UILabel!
    
    @IBOutlet var arriveTimeLabel: UILabel!
    
    @IBOutlet var remarksLabel: UILabel!
    
    @IBOutlet var userNameLabel: UILabel!
    
    @IBOutlet var userPhoneLabel: UILabel!
    
    @IBOutlet var carInfoLabel: UILabel!
    
    @IBOutlet var downOrderLabel: UILabel!
    
    
    @IBOutlet var refuseOrderBtn: UIButton!
    
    @IBOutlet var getOrderBtn: UIButton!
    
    @IBOutlet var flishOrderBtn: UIButton!
    
    var tapthreeBtnblock:ThreeBtnBlock?
    
    func callBackBlock(_ block: @escaping ThreeBtnBlock) {
        
        tapthreeBtnblock = block
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }
    
    @IBAction func refuseBtnPress(_ sender: UIButton) {
        if tapthreeBtnblock != nil {
            self.tapthreeBtnblock!(1)
        }
    }
    
    @IBAction func getOrderBtnPress(_ sender: UIButton) {
        if tapthreeBtnblock != nil {
            self.tapthreeBtnblock!(2)
        }
    }
    
    @IBAction func flinshOrderBtnPress(_ sender: UIButton) {
        if tapthreeBtnblock != nil {
            self.tapthreeBtnblock!(3)
        }
    }
    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
}
